<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"yoursite.com","root":"/","scheme":"Mist","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="Git使用指南">
<meta property="og:type" content="article">
<meta property="og:title" content="Git">
<meta property="og:url" content="http://yoursite.com/2020/05/12/Git/index.html">
<meta property="og:site_name" content="瑜晨の小窝">
<meta property="og:description" content="Git使用指南">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-05-12T12:29:09.695Z">
<meta property="article:modified_time" content="2020-05-12T12:29:09.695Z">
<meta property="article:author" content="Shen Yu Chen">
<meta property="article:tag" content="工具">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="http://yoursite.com/2020/05/12/Git/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>Git | 瑜晨の小窝</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">瑜晨の小窝</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/05/12/Git/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="Shen Yu Chen">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="瑜晨の小窝">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Git
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2020-05-12 20:29:09" itemprop="dateCreated datePublished" datetime="2020-05-12T20:29:09+08:00">2020-05-12</time>
            </span>

          
            <div class="post-description">Git使用指南</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="GIT"><a href="#GIT" class="headerlink" title="GIT"></a>GIT</h1><h2 id="获取Git仓库"><a href="#获取Git仓库" class="headerlink" title="获取Git仓库"></a>获取Git仓库</h2><h3 id="本地初始化仓库并提交到暂存"><a href="#本地初始化仓库并提交到暂存" class="headerlink" title="本地初始化仓库并提交到暂存"></a>本地初始化仓库并提交到暂存</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git init</span><br><span class="line">git add .</span><br><span class="line">git commit -m &#39;first commit&#39;</span><br></pre></td></tr></table></figure>

<h3 id="克隆现有的仓库"><a href="#克隆现有的仓库" class="headerlink" title="克隆现有的仓库"></a>克隆现有的仓库</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Git克隆的是该Git仓库服务器上几乎所有的数据，而不是仅仅复制完成你工作所需要的文件。</span><br><span class="line">当执行git clone命令时，默认配置下远程Git仓库中的每一个文件的每一个版本都将被拉取下来。  </span><br><span class="line">git clone  [url]</span><br></pre></td></tr></table></figure>

<h2 id="记录每次更新到仓库"><a href="#记录每次更新到仓库" class="headerlink" title="记录每次更新到仓库"></a>记录每次更新到仓库</h2><h3 id="检查当前文件状态"><a href="#检查当前文件状态" class="headerlink" title="检查当前文件状态"></a>检查当前文件状态</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git status</span><br></pre></td></tr></table></figure>

<h3 id="跟踪新文件"><a href="#跟踪新文件" class="headerlink" title="跟踪新文件"></a>跟踪新文件</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git add [file] 	跟踪指定文件</span><br><span class="line">git add . 		跟踪当前目录下文件</span><br><span class="line">git add * 		跟踪所有文件</span><br></pre></td></tr></table></figure>

<h3 id="忽略文件"><a href="#忽略文件" class="headerlink" title="忽略文件"></a>忽略文件</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">新建.gitignore 文件指定需要忽略的内容</span><br></pre></td></tr></table></figure>

<p>查看未暂存和已暂存的修改  </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">查看尚未暂存的文件更新了哪些部分(显示未暂存和已暂存的差异)</span><br><span class="line">git diff</span><br><span class="line">查看已暂存的将要添加到下次提交里的内容(显示已暂存和已提交的差异)</span><br><span class="line">git diff --cached</span><br></pre></td></tr></table></figure>

<h3 id="提交更新"><a href="#提交更新" class="headerlink" title="提交更新"></a>提交更新</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">-a选项，会自动把所有已经跟踪过的文件暂存起来一并提交，跳过git add</span><br><span class="line">-m选项，将提交信息与命令放在同一行</span><br><span class="line">git commit -a -m &#39;msg&#39;</span><br></pre></td></tr></table></figure>

<h3 id="移除文件"><a href="#移除文件" class="headerlink" title="移除文件"></a>移除文件</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">要从 Git中移除某个文件， 就必须要从已跟踪文件清单中移除（ 确切地说，是从暂存区域移除），然后提交。</span><br><span class="line">git rm [file]</span><br><span class="line">删除之前修改过并且已经放到暂存区域的文件，必须要用强制删除选项-f</span><br><span class="line">git rm -f [file]</span><br><span class="line">只将文件从Git仓库中删除（亦即从暂存区域移除），但仍保留在当前工作目录中</span><br><span class="line">git rm --cached [file]</span><br></pre></td></tr></table></figure>

<h3 id="移动文件-重命名文件"><a href="#移动文件-重命名文件" class="headerlink" title="移动文件  (重命名文件)"></a>移动文件  (重命名文件)</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git mv file_from file_to</span><br></pre></td></tr></table></figure>

<h2 id="查看提交历史"><a href="#查看提交历史" class="headerlink" title="查看提交历史"></a>查看提交历史</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">默认按提交时间列出所有的更新,常用的选项是-p,用来显示每次提交的内容差异。</span><br><span class="line">可以加上-2来仅显示最近两次提交</span><br><span class="line">查看简略的统计信息，可以使用--stat选项</span><br><span class="line">git log		</span><br><span class="line">git log -p -2 --stat</span><br></pre></td></tr></table></figure>

<h2 id="撤消操作"><a href="#撤消操作" class="headerlink" title="撤消操作"></a>撤消操作</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">这个命令会将暂存区中的文件提交。 如果自上次提交以来你还未做任何修改</span><br><span class="line">例如， 在上次提交后马上执行此命令， 那么快照会保持不变， 而所修改的只是提交信息。  </span><br><span class="line">git commit --amend</span><br><span class="line">假如提交后发现忘记暂存某些需要的修改,可以像这样操作：</span><br><span class="line">$ git commit -m &#39;initial commit&#39;</span><br><span class="line">$ git add forgotten_file</span><br><span class="line">$ git commit --amend</span><br></pre></td></tr></table></figure>

<h3 id="取消暂存的文件"><a href="#取消暂存的文件" class="headerlink" title="取消暂存的文件"></a>取消暂存的文件</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">默认只修改暂存区域</span><br><span class="line">git reset HEAD [file]</span><br><span class="line">将工作区和暂存区重置到HEAD版本,慎用--hard选项</span><br><span class="line">git reset --hard HEAD</span><br></pre></td></tr></table></figure>

<h3 id="撤消对文件的修改"><a href="#撤消对文件的修改" class="headerlink" title="撤消对文件的修改"></a>撤消对文件的修改</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">这是一个危险的命令，对文件做的任何修改都会消失,你只是拷贝了另一个文件来覆盖它。</span><br><span class="line">除非你确定不想要那个文件了， 否则不要使用这个命令</span><br><span class="line">git checkout -- [file]</span><br></pre></td></tr></table></figure>

<h2 id="远程仓库的使用"><a href="#远程仓库的使用" class="headerlink" title="远程仓库的使用"></a>远程仓库的使用</h2><h3 id="查看远程仓库"><a href="#查看远程仓库" class="headerlink" title="查看远程仓库"></a>查看远程仓库</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">默认列出指定的每一个远程服务器的简写，如果已经使用git clone命令克隆了仓库，</span><br><span class="line">那么至少能看到 origin ，这是 Git 给克隆的仓库服务器的默认名字</span><br><span class="line">指定选项 -v , 会显示需要读写远程仓库使用的 Git 保存的简写与其对应的 URL</span><br><span class="line">git remote -v</span><br><span class="line"></span><br><span class="line">查看某一个远程仓库的更多信息,它同样会列出远程仓库的 URL 与跟踪分支的信息。 这些信息非常有用， </span><br><span class="line">它告诉你正处于 master 分支， 并且如果运行 git pull， 就会抓取所有的远程引用， </span><br><span class="line">然后将远程 master 分支合并到本地 master 分支。 它也会列出拉取到的所有远程引用。</span><br><span class="line">git remote show [remote-name]</span><br></pre></td></tr></table></figure>

<h3 id="添加远程仓库"><a href="#添加远程仓库" class="headerlink" title="添加远程仓库"></a>添加远程仓库</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">添加一个新的远程 Git 仓库， 同时指定一个你可以轻松引用的简写</span><br><span class="line">git remote add &lt;shortname&gt; &lt;url&gt;</span><br><span class="line">例如：</span><br><span class="line">git remote add origin https:&#x2F;&#x2F;gitee.com&#x2F;syc476866651&#x2F;syc_blog.git</span><br><span class="line">git remote -v</span><br><span class="line">origin  https:&#x2F;&#x2F;gitee.com&#x2F;syc476866651&#x2F;syc_blog.git (fetch)</span><br><span class="line">origin  https:&#x2F;&#x2F;gitee.com&#x2F;syc476866651&#x2F;syc_blog.git (push)</span><br></pre></td></tr></table></figure>

<h3 id="从远程仓库拉取"><a href="#从远程仓库拉取" class="headerlink" title="从远程仓库拉取"></a>从远程仓库拉取</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">这个命令会访问远程仓库， 从中拉取所有你还没有的数据。 执行完成后， </span><br><span class="line">你将会拥有那个远程仓库中所有分支的引用， 可以随时合并或查看。  </span><br><span class="line">git fetch [remote-name]</span><br></pre></td></tr></table></figure>

<p>注意：<br>git fetch [remote-name]  会抓取克隆（ 或上一次抓取） 后新推送的所有工作。 必须注意git fetch 命令会将数据拉取到你的本地仓库， 它并不会自动合并或修改你当前的工作。 当准备好时你必须手动将其合并入你的工作  </p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">如果你有一个分支设置为跟踪一个远程分支，可以使用这个命令来抓取数据并自动尝试合并远程分支到当前分支</span><br><span class="line">git pull</span><br></pre></td></tr></table></figure>

<h3 id="推送到远程仓库"><a href="#推送到远程仓库" class="headerlink" title="推送到远程仓库"></a>推送到远程仓库</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">只有当你有所克隆服务器的写入权限， 并且之前没有人推送过时， 这条命令才能生效。 当你和其他人在同</span><br><span class="line">一时间克隆， 他们先推送到上游然后你再推送到上游， 你的推送就会毫无疑问地被拒绝。 你必须先将他们</span><br><span class="line">的工作拉取下来并将其合并进你的工作后才能推送。</span><br><span class="line">git push [remote-name] [branch-name]</span><br></pre></td></tr></table></figure>

<h3 id="远程仓库的移除与重命名"><a href="#远程仓库的移除与重命名" class="headerlink" title="远程仓库的移除与重命名"></a>远程仓库的移除与重命名</h3><p>重命名引用的名字可以运行 <code>git remote rename</code> 去修改一个远程仓库的简写名。 例如：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">git remote rename my_blog syc_blog</span><br><span class="line">git remote</span><br><span class="line">origin</span><br><span class="line">syc_blog</span><br></pre></td></tr></table></figure>

<p>使用 <code>git remote rm</code> 移除一个远程仓库 ,例如：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ git remote rm syc_blog</span><br><span class="line">$ git remote</span><br><span class="line">origin</span><br></pre></td></tr></table></figure>

<h2 id="打标签"><a href="#打标签" class="headerlink" title="打标签"></a>打标签</h2><p>像其他版本控制系统（ VCS，SVN） 一样， Git 可以给历史中的某一个提交打上标签， 以示重要。 比较有代表性<br>的是人们会使用这个功能来标记发布结点（ v1.0 等等） 。<br>下面我将介绍列出已有的标签、 如何创建新标签、 以及不同类型的标签分别是什么。  </p>
<h3 id="列出标签"><a href="#列出标签" class="headerlink" title="列出标签"></a>列出标签</h3>
    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E5%B7%A5%E5%85%B7/" rel="tag"># 工具</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2020/05/10/SpringMvc/" rel="prev" title="SpringMvc">
      <i class="fa fa-chevron-left"></i> SpringMvc
    </a></div>
      <div class="post-nav-item"></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#GIT"><span class="nav-number">1.</span> <span class="nav-text">GIT</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#获取Git仓库"><span class="nav-number">1.1.</span> <span class="nav-text">获取Git仓库</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#本地初始化仓库并提交到暂存"><span class="nav-number">1.1.1.</span> <span class="nav-text">本地初始化仓库并提交到暂存</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#克隆现有的仓库"><span class="nav-number">1.1.2.</span> <span class="nav-text">克隆现有的仓库</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#记录每次更新到仓库"><span class="nav-number">1.2.</span> <span class="nav-text">记录每次更新到仓库</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#检查当前文件状态"><span class="nav-number">1.2.1.</span> <span class="nav-text">检查当前文件状态</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#跟踪新文件"><span class="nav-number">1.2.2.</span> <span class="nav-text">跟踪新文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#忽略文件"><span class="nav-number">1.2.3.</span> <span class="nav-text">忽略文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#提交更新"><span class="nav-number">1.2.4.</span> <span class="nav-text">提交更新</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#移除文件"><span class="nav-number">1.2.5.</span> <span class="nav-text">移除文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#移动文件-重命名文件"><span class="nav-number">1.2.6.</span> <span class="nav-text">移动文件  (重命名文件)</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#查看提交历史"><span class="nav-number">1.3.</span> <span class="nav-text">查看提交历史</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#撤消操作"><span class="nav-number">1.4.</span> <span class="nav-text">撤消操作</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#取消暂存的文件"><span class="nav-number">1.4.1.</span> <span class="nav-text">取消暂存的文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#撤消对文件的修改"><span class="nav-number">1.4.2.</span> <span class="nav-text">撤消对文件的修改</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#远程仓库的使用"><span class="nav-number">1.5.</span> <span class="nav-text">远程仓库的使用</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#查看远程仓库"><span class="nav-number">1.5.1.</span> <span class="nav-text">查看远程仓库</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#添加远程仓库"><span class="nav-number">1.5.2.</span> <span class="nav-text">添加远程仓库</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#从远程仓库拉取"><span class="nav-number">1.5.3.</span> <span class="nav-text">从远程仓库拉取</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#推送到远程仓库"><span class="nav-number">1.5.4.</span> <span class="nav-text">推送到远程仓库</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#远程仓库的移除与重命名"><span class="nav-number">1.5.5.</span> <span class="nav-text">远程仓库的移除与重命名</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#打标签"><span class="nav-number">1.6.</span> <span class="nav-text">打标签</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#列出标签"><span class="nav-number">1.6.1.</span> <span class="nav-text">列出标签</span></a></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">Shen Yu Chen</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">3</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">2</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Shen Yu Chen</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://mist.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  

</body>
</html>
